home *** CD-ROM | disk | FTP | other *** search
/ ADA Programming Guide / ADA Programming Guide.iso / ada_gnu / adainc / a-stwise.ads < prev    next >
Text File  |  1996-01-30  |  4KB  |  83 lines

  1. ------------------------------------------------------------------------------
  2. --                                                                          --
  3. --                         GNAT RUNTIME COMPONENTS                          --
  4. --                                                                          --
  5. --              A D A . S T R I N G S . W I D E _ S E A R C H               --
  6. --                                                                          --
  7. --                                 S p e c                                  --
  8. --                                                                          --
  9. --                            $Revision: 1.3 $                              --
  10. --                                                                          --
  11. --           Copyright (c) 1992,1993,1994 NYU, All Rights Reserved          --
  12. --                                                                          --
  13. -- GNAT is free software;  you can  redistribute it  and/or modify it under --
  14. -- terms of the  GNU General Public License as published  by the Free Soft- --
  15. -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
  16. -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
  17. -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
  18. -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
  19. -- for  more details.  You should have  received  a copy of the GNU General --
  20. -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
  21. -- to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. --
  22. --                                                                          --
  23. ------------------------------------------------------------------------------
  24.  
  25. --  This package contains the search functions from Ada.Strings.Wide_Fixed.
  26. --  They are separated out because they are shared by Ada.Strings.Wide_Bounded
  27. --  and Ada.Strings.Wide_Unbounded, and we don't want to drag other irrelevant
  28. --  stuff from Ada.Strings.Wide_Fixed when using the other two packages. We
  29. --  make this a private package, since user programs should access these
  30. --  subprograms via one of the standard string packages.
  31.  
  32.  
  33. with Ada.Strings.Wide_Maps;
  34.  
  35. private package Ada.Strings.Wide_Search is
  36.  
  37.    function Index (Source   : in Wide_String;
  38.                    Pattern  : in Wide_String;
  39.                    Going    : in Direction := Forward;
  40.                    Mapping  : in Wide_Maps.Wide_Character_Mapping :=
  41.                                           Wide_Maps.Identity)
  42.       return Natural;
  43.  
  44.    function Index (Source   : in Wide_String;
  45.                    Pattern  : in Wide_String;
  46.                    Going    : in Direction := Forward;
  47.                    Mapping  : in Wide_Maps.Wide_Character_Mapping_Function)
  48.       return Natural;
  49.  
  50.    function Index (Source : in Wide_String;
  51.                    Set    : in Wide_Maps.Wide_Character_Set;
  52.                    Test   : in Membership := Inside;
  53.                    Going  : in Direction  := Forward)
  54.       return Natural;
  55.  
  56.    function Index_Non_Blank (Source : in Wide_String;
  57.                              Going  : in Direction := Forward)
  58.       return Natural;
  59.  
  60.    function Count (Source   : in Wide_String;
  61.                    Pattern  : in Wide_String;
  62.                    Mapping  : in Wide_Maps.Wide_Character_Mapping :=
  63.                                           Wide_Maps.Identity)
  64.       return Natural;
  65.  
  66.    function Count (Source   : in Wide_String;
  67.                    Pattern  : in Wide_String;
  68.                    Mapping  : in Wide_Maps.Wide_Character_Mapping_Function)
  69.       return Natural;
  70.  
  71.    function Count (Source   : in Wide_String;
  72.                    Set      : in Wide_Maps.Wide_Character_Set)
  73.       return Natural;
  74.  
  75.  
  76.    procedure Find_Token (Source : in Wide_String;
  77.                          Set    : in Wide_Maps.Wide_Character_Set;
  78.                          Test   : in Membership;
  79.                          First  : out Positive;
  80.                          Last   : out Natural);
  81.  
  82. end Ada.Strings.Wide_Search;
  83.